package com.example.oasystem.service;



import com.example.oasystem.entity.page.Page;
import com.example.oasystem.entity.user.AoaUser;
import com.github.pagehelper.PageInfo;

import java.util.HashMap;
import java.util.List;

public interface AoaUserService {

    AoaUser getAoaUser(String userName, String password);

    List<AoaUser> getAoaUserList();
    List<AoaUser> subordinateUsers(AoaUser aoaUser);
    /**
     * 更新用户信息，更新密码
     * @param aoaUser
     * @return
     */
    int updateAoaUserHasPwd(AoaUser aoaUser);

    /**
     * 更新用户信息，不更新密码
     * @param aoaUser
     * @return
     */
    int updateAoaUserNoPwd(AoaUser aoaUser);

    /**
     * 更新头像
     * @param aoaUser
     * @return
     */
    int updateImgPathById(AoaUser aoaUser);

    Long selectFartherIdByDeptAndPosition( Long deptId,Long roleId);

    /**
     * 查找部门用户
     * @param deptId
     * @param page
     * @return
     */

    List<AoaUser> selectByDeptId(Long deptId, Page page);

    /**
     * 更改部门编号和职位编号
     * @param changedeptid
     * @param positionid
     * @param userid
     * @return
     */
    int updateDeptAndPosition(Long changedeptid,Long positionid,Long userid);

    int updatePositionId(long userId,long deptId);

    /**
     * 根据角色查询当前用户
     * @param roleId
     * @return
     */
    List<AoaUser> getUser(long roleId);


    List<AoaUser> selectUserDeptAndAttendsList(Long userId,String startime,String endtime,String baseKey,int number,int size);

    List<AoaUser> selectUserDeptAndAttendsListByMonth(Long userId, String month,String baseKey,int number,int size);

    HashMap getUMap(Long userId, String month);

    PageInfo<AoaUser> selectAllDeptAndPosition(int pageNum, int pageSize, String baseKey);
    PageInfo<AoaUser> selectAllDeptAndPosition2(int pageNum, int pageSize, String baseKey,Long fatherid);

    List<AoaUser> selectProcessShenuser(String ... userName);
}
